#include"LinkTree.h"

#include<iostream>




int main()
{
    LinkTree tree;

    TreeNode *class1 = new TreeNode("275班");
    TreeNode *class2 = new TreeNode("276班");

    class1->Connect(tree.GetRoot());
    class2->Connect(tree.GetRoot());

    TreeNode *stu1 = new TreeNode("张三");
    TreeNode *stu2 = new TreeNode("李四");
    TreeNode *stu3 = new TreeNode("王五");
    TreeNode *stu4 = new TreeNode("赵六");


    stu1->Connect(class1);
    stu2->Connect(class1);

    stu3->Connect(class2);
    stu4->Connect(class2);

    tree.show();




    // TreeNode* node = tree.FindByElementType("赵六");

    // node->DisConnect(tree.FindByElementType("276班"));

    // node->Connect(tree.FindByElementType("275班"));

    // tree.show();

    std::cout<<"树高"<<tree.GetTreeHeight()<<std::endl;



    return 0;
}



